<style>
.control-label{
	padding-top: 0 !important;
}
</style>
<div class="panel panel-default">
	<div class="panel-heading">活动设置</div>
	<div class="panel-body">
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 活动名称</label>
            <div class="col-sm-9 col-xs-12">
               	<input type="text" id="title" class="form-control" placeholder="" name="stitle" value="{if $rule['stitle']}{$rule['stitle']}{else}浪漫七夕，齐搭建爱的鹊桥{/if}">
            </div>
        </div>
 		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 活动图片</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_image('sthumb',!empty($rule['sthumb'])?$rule['sthumb']:"../addons/$this->modulename/template/mobile/img/title.jpg");}
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 活动说明</label>
            <div class="col-sm-9 col-xs-12">
               	<textarea style="height:60px;" id='description' name="sdesc" class="form-control" cols="60">{if $rule['sdesc']}{$rule['sdesc']}{else}又一年一度的浪漫七夕来临，牛郎织女再次在鹊桥上相会！今年，邀请亲朋好友搭建你和她(他)的爱的幸福鹊桥！{/if}</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 活动时间</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_daterange('datelimit', array('start'=>date('Y-m-d H:i',$rule['starttime']),'end'=>date('Y-m-d H:i',$rule['endtime'])), true)}
            </div>
        </div> 
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 背景图</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_image('bg',!empty($rule['bg'])?$rule['bg']:"../addons/$this->modulename/template/mobile/img/bg.png");}
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 牛郎图</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_image('niulang',!empty($rule['niulang'])?$rule['niulang']:"../addons/$this->modulename/template/mobile/img/niulang.png");}
               	<div class="help-block" style="color: red;">请上传尺寸为 80 * 151 像素的图片</div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 织女图</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_image('zhinv',!empty($rule['zhinv'])?$rule['zhinv']:"../addons/$this->modulename/template/mobile/img/zhinv.png");}
               	<div class="help-block" style="color: red;">请上传尺寸为 64 * 151 像素的图片</div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 参与条件</label>
            <div class="col-sm-9 col-xs-12">
               	<label><input type="radio" name="describe_limit" value="0" checked> 必须关注</label>
               	<label style="margin-left: 20px;"><input type="radio" name="describe_limit" value="1" {if $rule['describe_limit']}checked{/if}> 不必关注</label>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 成功条件</label>
            <div class="col-sm-9 col-xs-12">
               	<div class="input-group" >
					 <div class="input-group-addon">获得</div>
					 <input type="number" min="1"  class="form-control" name="birds_success" value="{$rule['birds_success']}">
					 <div class="input-group-addon">喜鹊，搭桥成功</div>
				</div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 助力条件</label>
            <div class="col-sm-9 col-xs-12">
               	<label><input type="radio" name="describe_limit2" value="0" checked> 不必关注</label>
               	<label style="margin-left: 20px;"><input type="radio" name="describe_limit2" value="1" {if $rule['describe_limit2']}checked{/if}> 必须关注</label>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 朋友助力</label>
            <div class="col-sm-9 col-xs-12">
               	<div class="input-group" >
					 <div class="input-group-addon"><input type="radio" name="limit_type" value="0" checked> 每个朋友可提供</div>
					 <input type="number" min="0"  class="form-control" name="birds_limit" value="{$rule['birds_limit']}">
					 <div class="input-group-addon">喜鹊</div>
				</div>
				<div class="input-group" style="margin-top: 10px;">
					 <div class="input-group-addon"><input type="radio" name="limit_type" value="1" {if !$rule['birds_limit']}checked{/if}> 每个朋友可随机提供</div>
					 <input type="number" min="0"  class="form-control" name="birds_limit1" value="{$rule['birds_limit1']}">
					 <div class="input-group-addon">至</div>
					 <input type="number" min="0"  class="form-control" name="birds_limit2" value="{$rule['birds_limit2']}">
					 <div class="input-group-addon">喜鹊</div>
				</div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 排行榜显示人数</label>
            <div class="col-sm-9 col-xs-12">
               	<input type="number" min="0" id="rank" class="form-control" name="rank" value="{$rule['rank']}">
               	<div class="help-block">人数为0时，则不显示排行榜</div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 活动规则</label>
            <div class="col-sm-9 col-xs-12">
               	<textarea name="content" class="form-control richtext-clone" cols="60">{$rule['content']}</textarea>
            </div>
        </div>
       <!--  <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label" style="padding-top: 7px !important;">兑奖参数填写项</label>
            <div class="col-sm-9 col-xs-12">
               	<label for="isinfo_1" class="radio-inline"><input id="isinfo_1" type="radio" name="isinfo" value="0" checked="checked"> 参与时填写</label>
				<label for="isinfo_0" class="radio-inline"><input id="isinfo_0" type="radio" name="isinfo" value="1" {if $rule['isinfo']}checked{/if}> 中奖时填写</label>
            </div>
        </div> -->
		<div class="form-group">
 			<label class="col-xs-12 col-sm-3 col-md-2 control-label">兑奖输入项提示词</label>
            <div class="col-sm-9 col-xs-6">
				<input type="text" class="form-control" name="awardtips" value="{if $rule['awardtips']}{$rule['awardtips']}{else}为了将活动奖品更快、更准确的送达您手中，请留下您的个人信息，谢谢!{/if}">
            </div>
        </div>
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 兑奖输入参数项</label>
            <div class="col-sm-9 col-xs-12">
				<div style="border:1px #eee dashed; padding:10px;background:#F5F5F5;">					
               	    <label for="isrealname" class="checkbox-inline"><input id="isrealname" type="checkbox" name="isrealname" value="1" {if $rule['isrealname'] || !$rule['stitle']}checked{/if}> 姓名</label>
				    <label for="ismobile" class="checkbox-inline"><input id="ismobile" type="checkbox" name="ismobile" value="1"  {if $rule['ismobile'] || !$rule['stitle']}checked{/if}> 手机</label>
				    <label for="isqq" class="checkbox-inline"><input id="isqq" type="checkbox" name="isqq" value="1" {if $rule['isqq']}checked{/if}> QQ号</label>
				    <label for="isemail" class="checkbox-inline"><input id="isemail" type="checkbox" name="isemail" value="1" {if $rule['isemail']}checked{/if}> 邮箱</label>
				    <label for="isaddress" class="checkbox-inline"><input id="isaddress" type="checkbox" name="isaddress" value="1" {if $rule['isaddress']}checked{/if}> 地址</label>
				</div>
					<div class="help-block">必需选择一个参数兑奖 活动开启后最好不要修改 </div>
            </div>
        </div>
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label" style="padding-top: 7px !important;"> 兑奖输入参数同步</label>
            <div class="col-sm-9 col-xs-12">
				<label for="isfans_0" class="radio-inline"><input id="isfans_0" type="radio" name="isfans" value="0" checked> 参数项只保留本模块下</label>
				<label for="isfans_1" class="radio-inline"><input id="isfans_1" type="radio" name="isfans" value="1"  {if $rule['isfans']}checked{/if}> 参数项同步更新至官方会员信息表中</label>
            </div>
        </div>
        
	</div>
</div>
<div class="panel panel-default" id="award">
	<div class="panel-heading">
		奖品设置
	</div>
	<div class="panel-body">
		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label" style="padding-top: 7px !important;"> 获奖条件</label>
            <div class="col-sm-9 col-xs-12">
               	<label><input type="radio" name="prize_mode" value="0" checked> 所有搭桥成功者</label>
               	<label style="margin-left: 20px;"><input type="radio" name="prize_mode" value="1" {if $rule['prize_mode']}checked{/if}> 最快搭桥成功的<input type="number" min="0" class="form-control" style="display: inline-block;width: 80px;" name="prize_limit" value="{$rule['prize_limit']}" placeholder="人数">人</label>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 奖品名称</label>
            <div class="col-sm-9 col-xs-12">
               	<input type="text" id="etitle" class="form-control" placeholder="" name="title" value="{$rule['title']}">
            </div>
        </div>
 		<div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 奖品图片</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_image('thumb',$rule['thumb']);}
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 奖品简介</label>
            <div class="col-sm-9 col-xs-12">
               	<textarea style="height:60px;" name="description" class="form-control" cols="60">{$rule['description']}</textarea>
            </div>
        </div>
	</div>
</div>
<div class="panel panel-default">
	<div class="panel-heading">
		分享设置
	</div>
	<div class="panel-body">
            <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
	            <div class="col-sm-9 col-xs-12">
	               	<input type="text" class="form-control" placeholder="" name="sharetitle" value="{if $rule['sharetitle']}{$rule['sharetitle']}{else}浪漫七夕，搭建我和她(他)爱的鹊桥！{/if}">
	            </div>
	        </div>	
	         <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
                <div class="col-sm-9">
					{php echo tpl_form_field_image('sharethumb',!empty($rule['sharethumb'])?$rule['sharethumb']:"../addons/$this->modulename/template/mobile/img/title.jpg");}
				</div>
            </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享概述</label>
	            <div class="col-sm-9 col-xs-12">
	               	<input type="text" class="form-control" placeholder="" name="sharedesc" value="{if $rule['sharedesc']}{$rule['sharedesc']}{else}又一年一度的浪漫七夕来临，牛郎织女再次在鹊桥上相会！今年，搭建我和她(他)的爱的幸福鹊桥！{/if}">
	            </div>
	        </div>	
     </div>
 </div>
 <script>
 require(['jquery', 'util'], function($, u){
	    $(function(){
	        u.editor($('.richtext-clone')[0]);
	    });
	});
 </script>